package com.brilliance.project.common.report;

import java.util.ArrayList;
import java.util.List;

import com.brilliance.project.webapp.form.BRT_SForm;

/**
 * 此Class主要用来给ireport制报表时的测试用。<br />
 * 1. 打开Connections/Datasource,选择javaBeans，点选Modify<br />
 * 2. 在Factory class中填：com.brilliance.project.common.report.JRDataSourceFactory<br />
 * 3. 选择Collection of javaBeans<br />
 * 4. 在The static method to call to retrive the array or the the
 * collections中填：getList<br />
 * 5. 然后就可以test了。<br />
 * 6. 在Preview时，就可以看到这个静态方法返回的数据显示在模板中。<br />
 * 
 * @author HLJ
 * 
 */
public class JRDataSourceFactory {

	public static List<BRT_SForm> getList() {
		List<BRT_SForm> list = new ArrayList<BRT_SForm>();
		BRT_SForm form = null;
		for (int i = 0; i <= 10; i++) {
			form = new BRT_SForm();
			form.setBrtbrnam("brname" + i);
			form.setBrtpro_cod("" + i);
			list.add(form);
		}
		return list;
	}

	public static void main(String[] args) {
		JRDataSourceFactory.getList();
	}
}
